package top.littlejiang.onlinexam.service;

import top.littlejiang.onlinexam.entity.OlexamMenuRole;
import top.littlejiang.onlinexam.common.base.BaseService;

import java.util.List;

/**
 * <p>
 * OlexamMenuRole 服务类
 * </p>
 *
 * @author chen
 * @since 2020-12-26
 */
public interface OlexamMenuRoleService extends BaseService<OlexamMenuRole> {

    /**
     * 根据角色查询菜单id
     * @param roleId
     * @return
     */
    List<Integer> getMenusByRole(int roleId);

    /**
     * 更新角色菜单
     * @param newMenus
     * @param roleId
     */
    void insertOrDelete(List<Integer> newMenus, Integer roleId);
}
